
window.onload = function () {
    document.getElementById("head_left").classList.add('active');
    document.getElementById("allSpan").classList.add('all');
    document.getElementById("head_span").style.display = "none";
}

var urls = ["seeding.jsp", "video.jsp", "audio.jsp"];
function change(url) {
    var selected = document.getElementById(url.id);
    var selected_head = document.getElementsByClassName("head_select");

    var span = document.getElementById("head_span");
    if (selected === selected_head[0]) {
        span.style.display = "none";
    }else {
        span.style.display = "block"
    }

    for (var i = 0; i < 3; i++) {
        if (selected === selected_head[i]) {
            frame.src = urls[i];
            selected_head[i].classList.add('active');
        } else {
            selected_head[i].classList.remove('active');
        }
    }

    document.getElementsByClassName("college_span")[0].classList.add('all');
    document.getElementsByClassName("college_span")[1].classList.remove('all');
}

function changeSpan(url) {
    var selected = document.getElementById(url.id);
    var select_span = document.getElementsByClassName("college_span");

    for (var i = 0; i < 2; i++) {
        if (selected === select_span[i]) {
            select_span[i].classList.add('all');
        } else {
            select_span[i].classList.remove('all');
        }
    }
}